package com.acoffee.java.aopAspect;

import org.springframework.aop.AfterReturningAdvice;
import org.springframework.aop.MethodBeforeAdvice;

import java.lang.reflect.Method;

/**
 * @author acoffee
 * @create 2021-11-15 17:26
 */
public class CookieAspect implements MethodBeforeAdvice, AfterReturningAdvice {
    @Override
    public void afterReturning(Object returnValue, Method method, Object[] args, Object target) throws Throwable {
        System.out.println("洗碗！");
    }

    @Override
    public void before(Method method, Object[] args, Object target) throws Throwable {
        System.out.println("洗菜！");
    }
}
